
#ifndef RENDERPROGRAM_H_
#define RENDERPROGRAM_H_

#include "Core.h"

namespace p2 {

enum {
	PROGRAM_VC = 0,
	PROGRAM_VT,
	PROGRAM_VTC,
	NUM_PROGRAMS
};

class RenderProgram
{
public:
    inline RenderProgram();
    virtual ~RenderProgram();

    /*
     * access
     */
    inline int getColourLoc() const;
    inline void setColourLoc(int colourLoc);
    inline GLuint getId() const;
    inline void setId(GLuint id);
    inline int getMapsLoc() const;
    inline void setMapsLoc(int mapsLoc);
    inline int getMvpMatrixLoc() const;
    inline void setMvpMatrixLoc(int mvpMatrixLoc);
    inline int getPositionLoc() const;
    inline void setPositionLoc(int positionLoc);
    inline int getTexCoordLoc() const;
    inline void setTexCoordLoc(int texCoordLoc);

private:
    GLuint _id;
    int _mapsLoc;
    int _mvpMatrixLoc;
    int _positionLoc;
    int _colourLoc;
    int _texCoordLoc;
};

inline RenderProgram::RenderProgram()
:   _id(0),
    _mapsLoc(-1),
    _mvpMatrixLoc(-1),
    _positionLoc(-1),
    _colourLoc(-1),
    _texCoordLoc(-1)
{
}

/*
 * access
 */
inline int RenderProgram::getColourLoc() const
{
	return _colourLoc;
}

inline void RenderProgram::setColourLoc(int colourLoc)
{
	_colourLoc = colourLoc;
}

inline GLuint RenderProgram::getId() const
{
	return _id;
}

inline void RenderProgram::setId(GLuint id)
{
	_id = id;
}

inline int RenderProgram::getMapsLoc() const
{
	return _mapsLoc;
}

inline void RenderProgram::setMapsLoc(int mapsLoc)
{
	_mapsLoc = mapsLoc;
}

inline int RenderProgram::getMvpMatrixLoc() const
{
	return _mvpMatrixLoc;
}

inline void RenderProgram::setMvpMatrixLoc(int mvpMatrixLoc)
{
	_mvpMatrixLoc = mvpMatrixLoc;
}

inline int RenderProgram::getPositionLoc() const
{
	return _positionLoc;
}

inline void RenderProgram::setPositionLoc(int positionLoc)
{
	_positionLoc = positionLoc;
}

inline int RenderProgram::getTexCoordLoc() const
{
	return _texCoordLoc;
}

inline void RenderProgram::setTexCoordLoc(int texCoordLoc)
{
	_texCoordLoc = texCoordLoc;
}

}

#endif /* RENDERPROGRAM_H_ */
